How to use AWS SSM parameter store values in Cloudformation template conditionals?

I have configured a key value pair in the AWS SSM parameter store UI as my-ssm-key = ssm-value. I have the following YAML template for CF built on Serverless: service: redirect-test provider: name: aws runtime: python3.8 environment: ssm_value: ” ssm_value_is_correct: !If [SSM_KEY_IS_CORRECT, yes, no] functions: hello: handler: handler.hello resources: Conditions: SSM_KEY_IS_CORRECT: !Equals – ” -…

Details

restorecon not setting fcontext created using semanage

I think there is a gap in my understanding of how to change one file’s context permantently. After reading through https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html-single/selinux_users_and_administrators_guide/index#sect-Security-Enhanced_Linux-SELinux_Contexts_Labeling_Files-Persistent_Changes_semanage_fcontext, I think I should be able to set a context for a file and restorecon will then use that instead of any selinux policy for that file. However, I’m seeing a restorecon set this…

Details

how to read input file that occasionally contains extra line feeds?

Most of the time, I am given an input file that looks like this: java-1.8.0-openjdk.x86_64 1:1.8.0.232.b09-1.el6_10 asyum:ol6_latest java-1.8.0-openjdk-headless.x86_64 1:1.8.0.232.b09-1.el6_10 asyum:ol6_latest kernel.x86_64 2.6.32-754.23.1.el6 asyum:ol6_latest …and I have a while loop that is able to successfully capture field1 and field2 from each line using this code: f1=$(echo $line | awk ‘{print $1}’) f2=$(echo $line | awk ‘{print…

Details