Package: update-conf-py-do-not-use
update-conf-py-DO-NOT-USEIMPORTANT:This is a fork ofupdate-conf.pywith the goal to test AWS CodePipeline as well as the whole AWS Code* stack. This project shouldNOTbe used in production.Also, the code will be stored into 2 repos: CodeCommit, to better test the full AWS Code* stack; GitHub, as Coveralls free plan only supports it.Default CodeBuild badge:Badge via custom API based on eventbridge CodeBuild events:Badge via custom API based on proxying the default CodeBuild badge:Generate config files fromconf.dlike directories.Split your config file into smaller files, called snippets, in aconf.dlike directory. The generated config file will be the concatenation of all snippets, with snippets ordered by the lexical order of their names.Files ending with.bak,.oldand other similar terminations will be ignored.This project was based on theupdate-conf.d project.InstallThis project works in Python 3 (3.7 or newer).To install:pipinstallupdate-conf-py-do-not-useTo install via AWS CodeArtifact:CODEARTIFACT_AUTH_TOKEN=$(awscodeartifactget-authorization-token\--domaintest--queryauthorizationToken--outputtext)AWS_ACCOUNT=$(awsstsget-caller-identity--query"Account"--outputtext)pipinstallupdate-conf-py-do-not-use\-ihttps://aws:${CODEARTIFACT_AUTH_TOKEN}@test-${AWS_ACCOUNT}.d.codeartifact.us-east-1.amazonaws.com/pypi/pypi/simple/It's possible to clone the project in AWS CodeCommit and install it viasetuptools:gitclonehttps://git-codecommit.us-east-1.amazonaws.com/v1/repos/update-conf-py-DO-NOT-USEcdupdate-conf-py-DO-NOT-USE
pythonsetup.pyinstallUsageTo generate a config file, you can run something like this:update-conf-py-do-not-use-f/etc/snmp/snmpd.confThe example above will merge the snippets in the directory/etc/snmp/snmpd.conf.dinto the file/etc/snmp/snmpd.conf.If the directory containing the snippets uses a diferent name pattern, you can pass its name as an argument:update-conf-py-do-not-use-f/etc/snmp/snmpd.conf-d/etc/snmp/snmpd.dIt's also possible to define frequently used options in a config file. For example, in/etc/update-conf-py-do-not-use.conf:[snmpd]file=/etc/snmp/snmpd.confdir=/etc/snmp/snmpd.dNow, you can run:update-conf-py-do-not-use-nsnmpdTo get help:update-conf-py-do-not-use--helpConfig filesupdate-conf-py-do-not-usewill use the global config file (/etc/update-conf-py-do-not-use.conf) or the user-home config file (~/.update-conf-py-do-not-use.conf) if they exist.You can use the the sample config file (provided within the distributed package) as a start point:cp${prefix}/share/update-conf-py-do-not-use/update-conf-py-do-not-use.conf/etc/update-conf-py-do-not-use.confIt's also possible to pass a custom config file via command line args:update-conf-py-do-not-use-cmy_custom_config.conf-nsnmpdMore examplesSuppose you have 2 snippets. One is/etc/snmp/snmpd.conf.d/00-main:syslocation Unknownsyscontact Root <root@localhost>And the other is/etc/snmp/snmpd.conf.d/01-permissions:rocommunity public 192.168.0.0/24After runningupdate-conf-py-do-not-use -f /etc/snmp/snmpd.conf, the generated config file will be:# Auto-generated by update-conf-py-do-not-use# Do NOT edit this file by hand. Your changes will be overwritten.syslocation Unknownsyscontact Root <root@localhost>rocommunity public 192.168.0.0/24There are cases when it's useful to change the prefix used in the auto-generated comment. After runningupdate-conf-py-do-not-use -f /etc/php.ini -p ';', the generated config will start with:; Auto-generated by update-conf-py-do-not-use; Do NOT edit this file by hand. Your changes will be overwritten.It's also possible to set the prefix used in the auto-generated comment via config file. For instance, in/etc/update-conf-py-do-not-use.conf:[php]file=/etc/php.inidir=/etc/php.dprefix_comment=;LicenseThis software is released under theRevised BSD License.ChangelogCheck theCHANGELOGpage.ContributingIf you want to contribute with this project, check theCONTRIBUTINGpage.TODOPublish this software in a Ubuntu PPA.